<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <% include header.ejs%>
    <title>categorys</title>
</head>

<body>
  <% include nav.ejs%>
    <div class="container mt-3">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12">
            <a class="btn btn-primary btn-outline-dark btn-block" href="<%= module_dir%>/categorys/0" role="button">创建分类</a>
          </div>
        </div>
        <div class="row">
            <%if(list.length){%>
              <div class="col-12 bd-content mt-3">
                  <div class="bd-example">
                    <table class="table table-dark">
                      <thead>
                        <tr>
                          <th scope="col">id</th>
                          <th scope="col">name</th>
                          <th scope="col">修改时间</th>
                        </tr>
                      </thead>
                      <tbody>
                        <%for(i in list){%>
                          <tr>
                              <th scope="row"><a href="<%= module_dir%>/categorys/<%= list[i]['id']%>"><%= list[i]['id']%></a></th>
                              <td><%= list[i]['name']%></td>
                              <td><%= list[i]['updated_at']%></td>
                          </tr>
                        <%}%>
                      </tbody>
                    </table>
                  </div>
                </div>
            <%}%>
        </div>
      </div>
    </div>
</body>
<script>
</script>

</html>